A Run-time System for SCOOP
نویسندگان
چکیده
ing locking in terms of fast and slow methods of lock acquisition, where the slow method requires communication between threads on wait queues, is similar to the approach described by Agesen [1]. The list built by the unlocking processor is called the HANDOFF-list and the process of signalling each processor in turn is called the HANDOFF-protocol. Each processor woken during the HANDOFF-protocol has exclusive access to the lock manager despite not currently owning the lock manager mutex. Thus there is always only one thread of execution in the lock manager. This means that actions on the wait queues are implicitly serialized. The order of processors on the wait queues never explicitly changes (processors don’t get a new time stamp while on the wait queues). However, a later processor may overtake an earlier one if it can gain all its resources while the earlier processor is waiting on some other resource. Some resource allocation algorithms do not allow such overtaking, but it is required in this case as the earlier process may be waiting on a lock held by the later one (because of the nested locking), so deadlock would occur if overtaking were not allowed. The pseudo code algorithms for the entry and exit sections are given in Figures 9 and 10. Multiple instructions written on one line, separated by a dash (—), indicate a group of instructions executed atomically. lock_resources(S) /* S is the set of resources to lock */ lock(LockManager) get timestamp i := 0 while i< |S| do i := i + 1 trylock(si) if could not lock si add self to si wait queue for j:= 1 to i do unlock s j end unlock(LockManager) — signal HANDOFF — wait i := 0 end end signal HANDOFF if this subsystem still holds a lock on LockManager unlock(LockManager) end Figure 9: The entry section of the resource allocation algorithm for the SCOOP run-time system. 142 JOURNAL OF OBJECT TECHNOLOGY VOL 1, NO. 3 4 DESIGN AND IMPLEMENTATION unlock_resources(S) /* S is the set of resources to unlock */ lock(LockManager) foreach si ∈ S unlock(si) if no recursive lock is held on si add si wait list to HANDOFF-list end end signal HANDOFF — wait unlock(LockManager) Figure 10: The exit section of the resource allocation algorithm for the SCOOP run-time system.
منابع مشابه
SCOOP An Investigation of Concurrency in Eiffel
Bertrand Meyer has defined an inter-object concurrency mechanism for the Eiffel language. The mechanism, SCOOP (Simple Concurrent Object-Oriented Programming), differs significantly from the concurrency mechanisms of Java, and many other objectoriented languages. This thesis presents the mechanism described by Meyer. Its properties are considered, and a model that describes SCOOP is derived. Fr...
متن کاملA Static C++ Object-Oriented Programming (SCOOP) Paradigm Mixing Benefits of Traditional OOP and Generic Programming
Object-oriented and generic programming are both supported in C++. The former provides high expressiveness whereas the latter leads to more efficient programs by avoiding dynamic typing. This paper presents SCOOP, a new paradigm which enables both classical objectoriented design and high performance in C++ by mixing object-oriented programming and generic programming. We show how classical and ...
متن کاملCo man deadlocks in SCOOP ∗
In this paper we address the deadlock detection problem in the context of SCOOP an OOprogramming model for concurrency, recently formalized in Maude. We present the integration of a deadlock detection mechanism on top of the aforementioned formalization and analyze how an abstract semantics of SCOOP based on a notion of may alias expressions can contribute to improving the deadlock detection pr...
متن کاملPro/con debate: Is the scoop and run approach the best approach to trauma services organization?
You are asked to be involved in organizing a trauma service for a major urban center. You are asked to make a decision on whether the services general approach to trauma in the city (which does have a well-established trauma center) will be scoop and run (minimal resuscitation at the scene with a goal to getting the patient to a trauma center as quickly as possible) or on-the-scene resuscitatio...
متن کاملA Static C++ Object-Oriented Programming (SCOOP) Paradigm Mixing Benefits of Traditional OOP and Generic Programming.................... 1
Object-oriented and generic programming are both supported in C++.OOP provides high expressiveness whereas GP leads to more efficient programsby avoiding dynamic typing. This paper presents SCOOP, a new paradigm whichenables both classical OO design and high performance in C++ by mixing OOPand GP. We show how classical and advanced OO features such as virtual meth-ods, multi...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید
ثبت ناماگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید
ورودعنوان ژورنال:
- Journal of Object Technology
دوره 1 شماره
صفحات -
تاریخ انتشار 2002